set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
set(PYTORCH_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/pytorch)
set(UTF8PROC_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/utf8proc)

# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")

# include_directories(${TORCH_INCLUDE_DIRS})
include_directories(${PYTORCH_INCLUDE_PATH}/include
                    ${PYTORCH_INCLUDE_PATH}/include/torch/csrc/api/include
                    ${UTF8PROC_INCLUDE_PATH})
add_subdirectory(task EXCLUDE_FROM_ALL)
add_subdirectory(token EXCLUDE_FROM_ALL)
add_library(model SHARED BartModel.cpp)
target_link_libraries(model PUBLIC tokenizer task nlohmann_json::nlohmann_json)
target_link_libraries(model PUBLIC hilog_ndk.z)